<div class="refentry" lang="en" xml:lang="en"><a id="glGetPolygonStipple"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>glGetPolygonStipple — return the polygon stipple pattern</p></div><div class="refsynopsisdiv"><h2>C Specification</h2><div class="funcsynopsis"><table><tr><td><code class="funcdef">void <b class="fsfunc">glGetPolygonStipple</b>(</code></td><td>GLubyte *  </td><td><var class="pdparam">pattern</var><code>)</code>;</td></tr></table></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="parameters"></a><h2>Parameters</h2><div class="variablelist"><dl><dt><span class="term"><em class="parameter"><code>pattern</code></em></span></dt><dd><p>
                    Returns the stipple pattern. The initial value is all 1's.
                </p></dd></dl></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="description"></a><h2>Description</h2><p>
            <code class="function">glGetPolygonStipple</code> returns to <em class="parameter"><code>pattern</code></em> a
            <math overflow="scroll">

                <mrow>
                    <mn>32</mn>
                    <mo>×</mo>
                    <mn>32</mn>
                </mrow>
            </math>
            polygon stipple pattern.
            The pattern is packed into memory as if <a class="citerefentry" href="glReadPixels"><span class="citerefentry"><span class="refentrytitle">glReadPixels</span></span></a>
            with both <span class="emphasis"><em>height</em></span> and <span class="emphasis"><em>width</em></span> of 32,
            <span class="emphasis"><em>type</em></span> of <code class="constant">GL_BITMAP</code>,
            and <span class="emphasis"><em>format</em></span> of <code class="constant">GL_COLOR_INDEX</code> were called,
            and the stipple pattern were stored in an internal
            <math overflow="scroll">

                <mrow>
                    <mn>32</mn>
                    <mo>×</mo>
                    <mn>32</mn>
                </mrow>
            </math>
            color
            index buffer.
            Unlike <a class="citerefentry" href="glReadPixels"><span class="citerefentry"><span class="refentrytitle">glReadPixels</span></span></a>,
            however,
            pixel transfer operations
            (shift, offset, pixel map)
            are not applied to the returned stipple image.
        </p><p>
            If a non-zero named buffer object is bound to the <code class="constant">GL_PIXEL_PACK_BUFFER</code> target
            (see <a class="citerefentry" href="glBindBuffer"><span class="citerefentry"><span class="refentrytitle">glBindBuffer</span></span></a>) while a polygon stipple pattern is
            requested, <em class="parameter"><code>pattern</code></em> is treated as a byte offset into the buffer object's data store.
        </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="notes"></a><h2>Notes</h2><p>
            If an error is generated,
            no change is made to the contents of <em class="parameter"><code>pattern</code></em>.
        </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="errors"></a><h2>Errors</h2><p>
            <code class="constant">GL_INVALID_OPERATION</code> is generated if a non-zero buffer object name is bound to the
            <code class="constant">GL_PIXEL_PACK_BUFFER</code> target and the buffer object's data store is currently mapped.
        </p><p>
            <code class="constant">GL_INVALID_OPERATION</code> is generated if a non-zero buffer object name is bound to the
            <code class="constant">GL_PIXEL_PACK_BUFFER</code> target and the data would be packed to the buffer
            object such that the memory writes required would exceed the data store size.
        </p><p>
            <code class="constant">GL_INVALID_OPERATION</code> is generated if <code class="function">glGetPolygonStipple</code>
            is executed between the execution of <a class="citerefentry" href="glBegin"><span class="citerefentry"><span class="refentrytitle">glBegin</span></span></a>
            and the corresponding execution of <a class="citerefentry" href="glEnd"><span class="citerefentry"><span class="refentrytitle">glEnd</span></span></a>.
        </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="associatedgets"></a><h2>Associated Gets</h2><p>
            <a class="citerefentry" href="glGet"><span class="citerefentry"><span class="refentrytitle">glGet</span></span></a> with argument <code class="constant">GL_PIXEL_PACK_BUFFER_BINDING</code>
        </p></div>
        {$pipelinestall}{$examples}
        <div class="refsect1" lang="en" xml:lang="en"><a id="seealso"></a><h2>See Also</h2><p>
            <a class="citerefentry" href="glPixelStore"><span class="citerefentry"><span class="refentrytitle">glPixelStore</span></span></a>,
            <a class="citerefentry" href="glPixelTransfer"><span class="citerefentry"><span class="refentrytitle">glPixelTransfer</span></span></a>,
            <a class="citerefentry" href="glPolygonStipple"><span class="citerefentry"><span class="refentrytitle">glPolygonStipple</span></span></a>,
            <a class="citerefentry" href="glReadPixels"><span class="citerefentry"><span class="refentrytitle">glReadPixels</span></span></a>
        </p></div><div class="refsect1" lang="en" xml:lang="en"><div id="Copyright"><h2>Copyright</h2><p>
            Copyright © 1991-2006
            Silicon Graphics, Inc. This document is licensed under the SGI
            Free Software B License. For details, see
            <a class="ulink" href="http://oss.sgi.com/projects/FreeB/" target="_top">http://oss.sgi.com/projects/FreeB/</a>.
        </p></div></div></div>
